﻿using System;
using UnityEngine;

// Token: 0x02000294 RID: 660
public abstract class AIGun : AIWeapon
{
	// Token: 0x170001B6 RID: 438
	// (get) Token: 0x06000E9E RID: 3742 RVA: 0x00070809 File Offset: 0x0006EA09
	public virtual int AnimGunType
	{
		get
		{
			return -1;
		}
	}

	// Token: 0x170001B7 RID: 439
	// (get) Token: 0x06000E9F RID: 3743 RVA: 0x00070809 File Offset: 0x0006EA09
	public virtual int AnimLayer
	{
		get
		{
			return -1;
		}
	}

	// Token: 0x170001B8 RID: 440
	// (get) Token: 0x06000EA0 RID: 3744 RVA: 0x0007080C File Offset: 0x0006EA0C
	public virtual string AnimTransitionName
	{
		get
		{
			return string.Empty;
		}
	}

	// Token: 0x06000EA1 RID: 3745 RVA: 0x00070813 File Offset: 0x0006EA13
	protected virtual void Start()
	{
		this.firingAudioSource.clip = this.defaultFiringAudioClip;
		this.projectileSpeedMult = GlobalPreferences.AIProjectileSpeed.value;
	}

	// Token: 0x06000EA2 RID: 3746 RVA: 0x00070836 File Offset: 0x0006EA36
	public virtual void SetColor(int r, int g, int b)
	{
		this.projectileColor = new Color(Mathf.Clamp01((float)r / 255f), Mathf.Clamp01((float)g / 255f), Mathf.Clamp01((float)b / 255f));
	}

	// Token: 0x06000EA3 RID: 3747 RVA: 0x0007086A File Offset: 0x0006EA6A
	public void SetProjectileScale(float scale)
	{
		this.projectileScaleMult = scale;
	}

	// Token: 0x06000EA4 RID: 3748 RVA: 0x00070873 File Offset: 0x0006EA73
	public void SetProjectileSpeed(float speedMult)
	{
		this.projectileSpeedMult = speedMult;
	}

	// Token: 0x06000EA5 RID: 3749 RVA: 0x00002973 File Offset: 0x00000B73
	public virtual void Fire()
	{
	}

	// Token: 0x06000EA6 RID: 3750 RVA: 0x00002973 File Offset: 0x00000B73
	public virtual void Fire(float inaccuraccyFactor)
	{
	}

	// Token: 0x06000EA7 RID: 3751 RVA: 0x0007087C File Offset: 0x0006EA7C
	public void PointAt(Transform target)
	{
		base.transform.LookAt(target);
	}

	// Token: 0x06000EA8 RID: 3752 RVA: 0x0007088A File Offset: 0x0006EA8A
	public void PointAt(Vector3 targetPos)
	{
		base.transform.LookAt(targetPos);
	}

	// Token: 0x06000EA9 RID: 3753 RVA: 0x00070898 File Offset: 0x0006EA98
	public void SetupFiringSound(string clip)
	{
		this.customFiringAudioClip = IOManager.Instance.LoadAudioClip(clip);
		if (this.customFiringAudioClip != null)
		{
			this.firingAudioSource.clip = this.customFiringAudioClip;
		}
		else
		{
			this.firingAudioSource.clip = this.defaultFiringAudioClip;
		}
	}

	// Token: 0x06000EAA RID: 3754 RVA: 0x000708EE File Offset: 0x0006EAEE
	public void SetupProjectileImpactSound(string clip)
	{
		this.customProjectileImpactAudioClip = IOManager.Instance.LoadAudioClip(clip);
	}

	// Token: 0x040013B3 RID: 5043
	protected Color projectileColor;

	// Token: 0x040013B4 RID: 5044
	[SerializeField]
	protected Transform firingPoint;

	// Token: 0x040013B5 RID: 5045
	[SerializeField]
	protected GameObject projectilePrefab;

	// Token: 0x040013B6 RID: 5046
	protected float projectileScaleMult = 1f;

	// Token: 0x040013B7 RID: 5047
	protected float projectileSpeedMult;

	// Token: 0x040013B8 RID: 5048
	protected AudioClip defaultFiringAudioClip;

	// Token: 0x040013B9 RID: 5049
	protected AudioClip customFiringAudioClip;

	// Token: 0x040013BA RID: 5050
	protected AudioClip customProjectileImpactAudioClip;

	// Token: 0x040013BB RID: 5051
	[SerializeField]
	protected AudioSource firingAudioSource;
}
